package com.link.gateway.base.time;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/**/gateway/time")
public class TimeController {

    @RequestMapping("/currentTime")
    public Map<String,Object> currentTime() {
        Map<String,Object> result = new HashMap<>(6);
        try {
            result.put("result",System.currentTimeMillis());
            result.put("success", true);
        } catch (Exception e) {
            result.put("success", false);
            result.put("result", e.getMessage());
        }
        return result;
    }

}
